package com.helloworld.demo;

public class User {

    private int i;

    public User(int i) {
        this.i = i;
    }

    public User() {
    }

    public void print(){
        System.out.println("俺是另外一个版本：自定义的加载器执行了");
    }

    static ThreadLocal<String> threadLocal = new ThreadLocal<>();

    public static void main(String[] args) {
        threadLocal.set("1");
        String s = threadLocal.get();
        Thread thread = Thread.currentThread();
    }


    @Override
    protected void finalize() throws Throwable {
        OOMTest.list.add(this);
        System.out.println(i);
    }
}
